﻿using Microsoft.Extensions.Logging.Abstractions;

namespace MiniJob.Orleans;

public abstract class GrainBase : Grain
{
    protected ILoggerFactory LoggerFactory => ServiceProvider.GetRequiredService<ILoggerFactory>() ?? NullLoggerFactory.Instance;

    protected ILogger Logger => LoggerFactory.CreateLogger(GetType());
}
